package general_class;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yzh
 * @data 2021/3/28 10:16
 */
public class TreeNode {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("one");
        list.add("two");
        list.add("two1");
        List<String> strings = list.subList(1, 2);
        list.add("four");
        for (String string : strings) {
            System.out.println(string);
        }
//        String[] strs = new String[]{"1", "2"};
//        List<String> strings = Arrays.asList(strs);
//        strs[0] = "3";
//        System.out.println(strings.get(0));
    }
    public int val;
    public TreeNode left;
    public TreeNode right;

    public TreeNode() {
        this(0, null, null);
    }

    public TreeNode(int val) {
        this(val, null, null);
    }

    public TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}
